/**
 * 
 */
package cn.dgfy.MyBatisStudy.bean;

/**
 * @author Tearfalls
 *
 */
public class Student {
	private Integer id;
	private String username;
	private String password;
	private String realName;
	private Sex sex;
	private SexSimpleName sexSimpleName;
	private SexSimpleOrdinal sexSimpleOrdinal;
	
	public Integer getId() {
		return id;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}
	
	public String getUsername() {
		return username;
	}
	
	public void setUsername(String username) {
		this.username = username;
	}
	
	public String getPassword() {
		return password;
	}
	
	public void setPassword(String password) {
		this.password = password;
	}
	
	public String getRealName() {
		return realName;
	}
	
	public void setRealName(String realName) {
		this.realName = realName;
	}
		
	public Sex getSex() {
		return sex;
	}
	
	public void setSex(Sex sex) {
		this.sex = sex;
	}
	
	public SexSimpleName getSexSimpleName() {
		return sexSimpleName;
	}

	public void setSexSimpleName(SexSimpleName sexSimpleName) {
		this.sexSimpleName = sexSimpleName;
	}

	public SexSimpleOrdinal getSexSimpleOrdinal() {
		return sexSimpleOrdinal;
	}

	public void setSexSimpleOrdinal(SexSimpleOrdinal sexSimpleOrdinal) {
		this.sexSimpleOrdinal = sexSimpleOrdinal;
	}

	/**
	 * 无参构造方法
	 */
	public Student() {
		super();
	}
	
	/**
	 * 部分参数构造方法，用于学生注册操作
	 * @param username 学生的用户名
	 * @param password 学生的密码
	 * @param realName 学生的真实姓名
	 */
	public Student(String username, String password, String realName) {
		super();
		this.username = username;
		this.password = password;
		this.realName = realName;
	}
	
	/**
	 * 全参数构造方法
	 * 
	 * @param id
	 *            学生的id
	 * @param username
	 *            学生的用户名
	 * @param password
	 *            学生的密码
	 * @param realName
	 *            学生的真实姓名
	 * @param sex
	 *            学生的性别
	 * @param sexSimpleName
	 *            学生的性别
	 * @param sexSimpleOrdinal
	 *            学生的性别
	 */
	public Student(Integer id, String username, String password, String realName, Sex sex, SexSimpleName sexSimpleName, SexSimpleOrdinal sexSimpleOrdinal) {
		super();
		this.id = id;
		this.username = username;
		this.password = password;
		this.realName = realName;
		this.sex = sex;
		this.sexSimpleName = sexSimpleName;
		this.sexSimpleOrdinal = sexSimpleOrdinal;
	}
	
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Student [ id = ");
		builder.append(id);
		builder.append(", username = ");
		builder.append(username);
		builder.append(", password = ");
		builder.append(password);
		builder.append(", realName = ");
		builder.append(realName);
		builder.append(", sex = ");
		builder.append(sex);
		builder.append(", sexSimpleName = ");
		builder.append(sexSimpleName);
		builder.append(", sexSimpleOrdinal = ");
		builder.append(sexSimpleOrdinal);
		builder.append(" ]");
		return builder.toString();
	}
}
